package com.cn.lycss.servlet;

import com.cn.lycss.model.CompanyModel;
import com.cn.lycss.model.NavModel;
import com.cn.lycss.service.CompanyService;
import com.cn.lycss.service.NavService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/company")
public class CompanyServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        CompanyService companyService=new CompanyService();
//        CompanyModel companyMode =companyService.getCompanyModel();
//        req.getSession().setAttribute("companyModel",companyMode);
//
//
//        NavService navService=new NavService();
//        NavModel[] navModels=navService.getNavModel();
//
//        req.setAttribute("navModels",navModels);
        CommonServlet.setCompanyAndNavDate(req);


        req.getRequestDispatcher("/jsp/company.jsp").forward(req,resp);
    }
}
